package main

import (
	"fmt"
	"studygo/day105/mylogger"
)

var log mylogger.Logger //声明全局接口变量

func main() {
	fmt.Println("日志库实现")
	// log := mylogger.NewConsoleLog("ERROR")  终端日志
	//log := mylogger.NewFileLogger("Info", "./", "wjp.log", 10*1024*1024) 文件日志
	log = mylogger.NewFileLogger("Info", "./", "wjp.log", 10*1024*1024)
	for {
		log.Debug("这是debug")
		log.Info("Info")
		log.Warning("Warning")
		id := 12
		name := "lixiang"
		log.Error("Error id:%d name:%s", id, name)
		log.Fatal("Fatal")
		// time.Sleep(time.Second)
	}

}
